package RPPM.service.Impl;
import RPPM.domain.*;
import RPPM.dao.ManagerDao;
import RPPM.dao.impl.ManagerDaoImpl;
import RPPM.service.ManagerService;

import java.util.List;
import java.util.Map;

public class ManagerServiceImpl implements ManagerService {
    private ManagerDao managerDao=new ManagerDaoImpl();


    @Override
    public boolean SaveTeacher(Teacher teacher) {
        boolean flag=managerDao.ProvideTeacherinformation(teacher);
        return flag;
    }

    @Override
    public boolean SaveExecutor(Executor executor) {
        boolean flag=managerDao.FindExecutor(executor);
        return flag;
    }

    @Override
    public List<Map<String, Object>> getStudents() {
        return managerDao.getStudents();
    }

    @Override
    public List<Map<String, Object>> getTeachers() {
        return managerDao.getTeachers();
    }

    @Override
    public List<Map<String, Object>> getPlans() {
        return managerDao.getPlans();
    }

    @Override
    public boolean addPlan(List<Map<String, Object>> datalist) {
        return managerDao.addPlan(datalist);
    }

    @Override
    public boolean addStudent(List<Map<String, Object>> datalist) {
        return managerDao.addStudent(datalist);
    }

    @Override
    public boolean addTeacher(List<Map<String, Object>> datalist) {
        return managerDao.addTeacher(datalist);
    }

    @Override
    public boolean deleteStudent(int stuid) {
        return managerDao.deleteStudent(stuid);
    }

    @Override
    public boolean deleteTeacher(int teaid) {
        return managerDao.deleteTeacher(teaid);
    }

    @Override
    public boolean deletePlan(int couid) {
        return managerDao.deletePlan(couid);
    }

    @Override
    public List<Map<String, Object>> findTeacher(String searchText) {
        return managerDao.findTeacher(searchText);
    }

    @Override
    public List<Map<String, Object>> findStudent(String searchText) {
        return managerDao.findStudent(searchText);
    }

    @Override
    public List<Map<String, Object>> findPlan(String searchText) {
        return managerDao.findPlan(searchText);
    }

    @Override
    public boolean changeStudent(int stuid, String column, String change) {
        return managerDao.changeStudent(stuid, column, change);
    }

    @Override
    public boolean changeTeacher(int teaid, String column, String change) {
        return managerDao.changeTeacher(teaid, column, change);
    }

    @Override
    public boolean changePlan(int couid, String column, String change) {
        return managerDao.changePlan(couid, column, change);
    }

}
